package shared;

/**
 * BudgetBuoy
 * 
 * Simplify your personal expense management
 * 
 * @team cs2103jan13-w15-3j
 */

//--------------------------------------------------------------

/**
 * Receipt Class
 * 
 * Description: -
 * 
 * 
 * @package shared
 * @author Li Yin (A0085686L)
 * @editor(s) -
 */
import java.util.ArrayList;

public class Receipt extends Expense{
	private String receiptNO;
	private String shop;
	private String contact;
	private ArrayList<ReceiptItem> items;

	//constructor
	public Receipt(int _ID, String _name, int _amt, int _dd, int _mm, int _yy, String _detail, 
			Mode _mode, Category _cat, String _shop, String _receiptNO, String _contact){
		super(_ID, _name, _amt, _dd, _mm, _yy, _detail, _mode, _cat);
		modifyReceiptID(_receiptNO);
		modifySeller(_shop);
		modifyContact(_contact); //null if no input for this field
		items = new ArrayList<ReceiptItem>();
	}

	//add method
	public void addItem(ReceiptItem anItem) {
		items.add(anItem);
	}

	//getters
	public String getReceiptNO() {
		return receiptNO;
	}
	public String getSeller() {
		return shop;
	}
	public ArrayList<ReceiptItem> getItems() {
		return items;
	}
	public String getContact() {
		return contact;
	}

	//mutators
	public void modifyReceiptID(String receiptNO) {
		this.receiptNO = receiptNO;
	}
	public void modifySeller(String shop) {
		this.shop = shop;
	}
	public void deleteItem(ReceiptItem anItem){
		items.remove(anItem);
	}
	public void modifyContact(String contact) {
		this.contact = contact;
	}

	//toString
	@Override
	public String toString(){

		return super.toString();
		
	}
}
